T=20; n=[22,22,22,22,18,17,20,18,18,23,19,22,16,21,20,23,17,22,21,22]; a=[32,30,23,19,33,24,28,22,36,25,35,16,40,7,14,21,10,38,34,39,27,29,29,35,33,25,9,10,34,32,39,38,16,14,19,23,26,22,21,18,27,40,31,20,23,18,37,38,22,27,29,35,36,13,39,31,7,5,19,32,34,40,21,26,30,33,27,30,39,29,37,13,32,17,14,38,18,23,20,22,31,19,36,16,24,40,34,3,30,40,2,29,21,34,16,38,35,14,33,37,28,32,39,31,36,19,21,33,32,23,9,27,40,34,5,36,39,19,38,28,24,35,31,25,12,30,32,38,28,15,18,34,40,36,27,26,33,6,24,11,16,39,29,22,18,25,37,27,17,33,29,28,19,26,36,34,40,13,35,39,31,19,29,39,15,31,36,32,26,30,40,37,23,25,12,20,34,10,38,19,32,39,36,40,24,12,37,28,34,27,20,14,31,15,33,26,11,23,30,38,29,35,31,35,9,13,33,26,7,32,36,30,28,21,37,17,39,29,15,34,40,30,26,34,14,37,40,33,10,18,12,25,22,38,36,23,31,32,29,17,15,35,39,19,30,31,34,22,32,12,39,21,35,38,36,37,18,27,40,28,22,13,35,11,32,17,27,20,8,26,39,33,34,37,38,24,40,36,29,30,17,25,33,16,35,31,22,37,26,32,21,14,34,36,20,38,24,29,40,8,16,31,32,23,18,25,28,36,39,40,19,12,37,24,26,38,20,34,33,29,9,13,35,38,34,36,33,39,31,19,20,23,32,40,10,29,28,35,37,11,21,39,35,38,24,32,15,34,40,29,27,20,25,31,19,30,28,33,14,36,17,23,25,36,33,31,37,40,29,28,17,23,19,18,26,21,24,6,30,22,39,34,20,34,40,13,25,32,19,38,27,31,37,11,17,35,29,36,20,14,9,33,39,21,30];